package com.mce.nebula.entity;

import com.mce.nebula.common.BaseEntity;
import jakarta.persistence.*;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 租户区域信息实体，对应Python的TenantRegionInfo模型
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Entity
@Table(name = "tenant_region", 
       uniqueConstraints = @UniqueConstraint(columnNames = {"tenant_id", "region_name"}))
public class TenantRegion extends BaseEntity {
    
    @Column(name = "tenant_id", length = 33, nullable = false)
    private String tenantId;
    
    @Column(name = "region_name", length = 64, nullable = false)
    private String regionName;
    
    @Column(name = "is_active", nullable = false)
    private Boolean isActive = true;
    
    @Column(name = "is_init", nullable = false)
    private Boolean isInit = false;
    
    @Column(name = "service_status", nullable = false)
    private Integer serviceStatus = 1; // 0:暂停，1:运行，2:关闭
    
    @Column(name = "region_tenant_name", length = 64)
    private String regionTenantName;
    
    @Column(name = "region_tenant_id", length = 32)
    private String regionTenantId;
    
    @Column(name = "region_scope", length = 32)
    private String regionScope; // private/public
    
    @Column(name = "enterprise_id", length = 32)
    private String enterpriseId;
}
